package homework.oo3.AnimalExercise2;

public class AnimalTest {
    public static void main(String[] args) {
        Dog dog = new Dog("大黄",22,"黄");
        dog.eat();//Dog类重写的
        dog.drink();//复用Animal的
        dog.lookHome();//Dog类特有的
        dog.swim();//Dog类重写的

        System.out.println("=======");
        Chick chick = new Chick("大紫",33,"紫");
        chick.eat();//Chick重写的
        chick.drink();//复用Animal的
        chick.layEggs();//Chick特有的

        System.out.println("=======");
        Fish fish = new Fish("大金",11,"金");
        fish.eat();//Fish类重写的
        fish.drink();//复用Animal的
        fish.swim();//Fish重写的
    }
}
